-- GENERATED SPELL FOR [Stolen Soul] --


function spell0_18441(pUnit, Event) --@Curse of Agony,n/a--
pUnit:FullCastSpellOnTarget(37334,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18441', 30000, 1)
end

function spell1_18441(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(37329,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18441', 3000, 1)
end

function spell2_18441(pUnit, Event) --@Freezing Trap,Self--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(37368,pUnit)
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_18441', 1, 1)
end

function spell3_18441(pUnit, Event) --@Frost Shock,n/a--
pUnit:FullCastSpellOnTarget(37332,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18441', 8332, 1)
end

function spell4_18441(pUnit, Event) --@Hammer of Justice,n/a--
pUnit:FullCastSpellOnTarget(37369,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18441', 4251, 1)
end

function spell5_18441(pUnit, Event) --@Hemorrhage,n/a--
pUnit:FullCastSpellOnTarget(37331,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18441', 10343, 1)
end

function spell6_18441(pUnit, Event) --@Mind Flay,n/a--
pUnit:FullCastSpellOnTarget(37330,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18441', 3000, 1)
end

function spell7_18441(pUnit, Event) --@Moonfire,n/a--
pUnit:FullCastSpellOnTarget(37328,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18441', 12000, 1)
end

function spell8_18441(pUnit, Event) --@Mortal Strike,n/a--
pUnit:FullCastSpellOnTarget(37335,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18441', 5325, 1)
end

function spell9_18441(pUnit, Event) --@Plague Strike,n/a--
pUnit:FullCastSpellOnTarget(58839,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18441', 575, 1)
end

function Sorts_18441(pUnit, Event)
local choix_sorts_18441 = math.random(0, 9)
if choix_sorts_18441 == 0 then
pUnit:RegisterEvent('spell0_18441', 1, 1)
end
if choix_sorts_18441 == 1 then
pUnit:RegisterEvent('spell1_18441', 1, 1)
end
if choix_sorts_18441 == 2 then
pUnit:RegisterEvent('spell2_18441', 1, 1)
end
if choix_sorts_18441 == 3 then
pUnit:RegisterEvent('spell3_18441', 1, 1)
end
if choix_sorts_18441 == 4 then
pUnit:RegisterEvent('spell4_18441', 1, 1)
end
if choix_sorts_18441 == 5 then
pUnit:RegisterEvent('spell5_18441', 1, 1)
end
if choix_sorts_18441 == 6 then
pUnit:RegisterEvent('spell6_18441', 1, 1)
end
if choix_sorts_18441 == 7 then
pUnit:RegisterEvent('spell7_18441', 1, 1)
end
if choix_sorts_18441 == 8 then
pUnit:RegisterEvent('spell8_18441', 1, 1)
end
if choix_sorts_18441 == 9 then
pUnit:RegisterEvent('spell9_18441', 1, 1)
end
end

function mob18441_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18441', math.random(1500, 3000), 1)
end

function mob18441_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18441_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18441_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18441, 1, 'mob18441_Action')
RegisterUnitEvent(18441, 2, 'mob18441_Leave')
RegisterUnitEvent(18441, 3, 'mob18441_Kill')
RegisterUnitEvent(18441, 4, 'mob18441_Die')
